/*package models;

import play.*;
import play.db.jpa.*;

import javax.persistence.*;
import java.util.*;

@Entity
public class Notifications extends Model {
	public int SenderID; // this is the sender id 
	public int ReceiverID; // this is the receiver id
	public int ExerciseID; // this is the exercise id to be reviewed 
	
	public Notifications( int SenderID , int ReceiverID) { // the constructor
		this.SenderID = SenderID;
		this.ReceiverID = ReceiverID;
		
	}
	
	
    public  Long [] FindReviewers() {  // this method retrieves reviewers from the users column
 	 int c = (RegisteredUser.findAll().size());   // saving the size of the user's column in a variable  	 
 	 RegisteredUser []  allRUsers = new RegisteredUser[c];         // creating an array that has the length of all the users in the database
 	Long []  reviewers = new  Long[c];	  // creating an array that has the length of all the users in the database where the reviewers' ids will be saved 
	     
 	 for(int j = 0 ; j < c ; j++) {
	    	if (RegisteredUser.isReviewer() == true) { // checks if the user is a reviewer or not
	   	   reviewers[j] = allRUsers[j].getId(); // saves the reviewer's id in the array,,
	   	   	  } 
	    	 }
	   	 
	     return reviewers; // returning the array of reviewers' ids 
     }
    
	     
	    
	
	 
	 // this method sends a notification message to all the reviewers to review a certain exercise
		// it takes an array of reviewers ids , the sender id which is in this case the exercise's creator , the notification to be sent
		
		public  void sendReviewExerciseMessage(  int sID, int rID )  {
			
			FindReviewers();
			//for(int i = 0 ; i < reviewer.length ; i++){// looping on the reviewers' array of ids  
	  		//rID = reviewer[i]; //sets the receiver id to be the reviewers' ids in the array
	  		// sID = Creator.ID; to be modified , in this case the sender id is the exercise's creator id 
	  		System.out.println("Please review my exercise"); // printing the notification to the reviewer
	  		System.out.println("This notification is from +sID"); // printing the sender's id of the notification 
	  		 
	  	 }
		}
		//public void publishExercise() {
			//if(Exercise.ispublished == false) {
				//Exercise.ispublished == true;*/
			
		

			
		


	